package b2.widget
{
	import flash.display.Sprite;
	import com.greensock.TweenLite;

	public class BlinkRec extends Sprite
	{
		public function BlinkRec(x:Number, y:Number, width:Number, height:Number, color:uint = 0xFFFF00)
		{
			super();
			var rrect:Sprite = new Sprite();
			rrect.graphics.lineStyle(2, color);
			rrect.graphics.drawRoundRect(x, y, width, height, 15, 15);
			addChild(rrect);
			startBlink();
		}
		
		private function startBlink():void
		{
			TweenLite.to(this, 0.6, {alpha:0, onComplete:backBlink});
		}
		
		private function backBlink():void
		{
			TweenLite.to(this, 0.6, {alpha:1, onComplete:startBlink});
		}
		
	}
}